<!DOCTYPE html><html xmlns:date="http://exslt.org/dates-and-times" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta charset="utf-8">
<title>Plurious Framework » \framework\engine\Router</title>
<meta name="author" content="Mike van Riel">
<meta name="description" content="">
<link href="../css/template.css" rel="stylesheet" media="all">
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner"><div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">Plurious Framework</a><div class="nav-collapse"><ul class="nav">
<li class="dropdown">
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
                                    API Documentation <b class="caret"></b></a><ul class="dropdown-menu">
<li><a>Namespaces</a></li>
<li><a href="../namespaces/framework.html"><i class="icon-th"></i> framework</a></li>
<li><a href="../namespaces/global.html"><i class="icon-th"></i> global</a></li>
<li><a href="../namespaces/plurious.html"><i class="icon-th"></i> plurious</a></li>
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
                                    Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
                                    Reports <b class="caret"></b></a><ul class="dropdown-menu">
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
                <span class="label label-info">439</span></a></li>
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
                <ul><li>todo 
                <span class="label label-info">82</span>
</li></ul></a></li>
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
                <span class="label label-info">0</span></a></li>
</ul>
</li>
</ul></div>
</div></div>
<div class="go_to_top"><a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a></div>
</div>
<div id="___" class="container">
<noscript><div class="alert alert-warning">
                            Javascript is disabled; several features are only available
                            if Javascript is enabled.
                        </div></noscript>
<div class="row">
<div class="span4">
<span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
</div>
<ul class="side-nav nav nav-list">
<li class="nav-header">
<i class="icon-custom icon-method"></i> Methods</li>
<li class="method public "><a href="#__construct" title="__construct :: Load up the config object for use here"><span class="description">Load up the config object for use here</span><pre>__construct()</pre></a></li>
<li class="method public "><a href="#buildRoutes" title="buildRoutes :: Build and test routes to controller, model and template"><span class="description">Build and test routes to controller, model and template</span><pre>buildRoutes()</pre></a></li>
<li class="nav-header protected">» Protected</li>
<li class="method protected "><a href="#breadcrumbs" title="breadcrumbs :: Creates and manages a list of breadcrumbs"><span class="description">Creates and manages a list of breadcrumbs</span><pre>breadcrumbs()</pre></a></li>
<li class="nav-header private">» Private</li>
<li class="method private "><a href="#buildDirectories" title="buildDirectories :: Decomposes provded route and sets file paths for controller, model and template
while a fully qualified namespaced class name, the method to call inside that
class and any parameters to pass to the method."><span class="description">Decomposes provded route and sets file paths for controller, model and template
while a fully qualified namespaced class name, the method to call inside that
class and any parameters to pass to the method.</span><pre>buildDirectories()</pre></a></li>
<li class="method private "><a href="#clearRoutes" title="clearRoutes :: Clears out the usefull data from the class."><span class="description">Clears out the usefull data from the class.</span><pre>clearRoutes()</pre></a></li>
<li class="nav-header">
<i class="icon-custom icon-property"></i> Properties</li>
<li class="nav-header protected">» Protected</li>
<li class="property protected "><a href="#%24class" title="$class :: holds fully qualified namespaced class name"><span class="description">holds fully qualified namespaced class name</span><pre>$class</pre></a></li>
<li class="property protected "><a href="#%24context" title="$context :: holds the app name as context"><span class="description">holds the app name as context</span><pre>$context</pre></a></li>
<li class="property protected "><a href="#%24controller" title="$controller :: holds fully qualified file path to the controller name being processed"><span class="description">holds fully qualified file path to the controller name being processed</span><pre>$controller</pre></a></li>
<li class="property protected "><a href="#%24layout_name" title="$layout_name :: holds the name of the view layout - this is the directory name for the view templates"><span class="description">holds the name of the view layout - this is the directory name for the view templates</span><pre>$layout_name</pre></a></li>
<li class="property protected "><a href="#%24method" title="$method :: hold requested method if a method was requested"><span class="description">hold requested method if a method was requested</span><pre>$method</pre></a></li>
<li class="property protected "><a href="#%24methodArgs" title="$methodArgs :: holds an array of method arguments pass along with route to method"><span class="description">holds an array of method arguments pass along with route to method</span><pre>$methodArgs</pre></a></li>
<li class="property protected "><a href="#%24model" title="$model :: holds the fully qualified file path to the model"><span class="description">holds the fully qualified file path to the model</span><pre>$model</pre></a></li>
<li class="property protected "><a href="#%24template" title="$template :: holds  fully qualified file path to the associated template"><span class="description">holds  fully qualified file path to the associated template</span><pre>$template</pre></a></li>
</ul>
</div>
<div class="span8">
<a name="%5Cframework%5Cengine%5CRouter" id="\framework\engine\Router"></a><ul class="breadcrumb">
<li>
<a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
</li>
<li><a href="../namespaces/framework.html">framework</a></li>
<span class="divider">\</span><li><a href="../namespaces/framework.engine.html">engine</a></li>
<li class="active">
<span class="divider">\</span><a href="../classes/framework.engine.Router.html">Router</a>
</li>
</ul>
<div href="../classes/framework.engine.Router.html" class="element class">
<p class="short_description">Dynamically creates fully qualified directory paths and namespaced class names
specifically for the Actions object.</p>
<div class="details">
<p class="long_description"><p>This class is very tightly coupled to the Actions Class</p></p>
<table class="table table-bordered">
<tr>
<th>author</th>
<td><a href="mailto:randy@plurious.com">Randy Casburn</a></td>
</tr>
<tr>
<th>copyright</th>
<td>Copyright Plurious Software, all rights reserved</td>
</tr>
<tr>
<th>license</th>
<td><a href="http://opensource.org/licenses/MIT">MIT</a></td>
</tr>
<tr>
<th>license</th>
<td><a href="http://www.opensource.org/licenses/mit-license.html">http://www.opensource.org/licenses/mit-license.html</a></td>
</tr>
<tr>
<th>link</th>
<td><a href="http://plurious.com/framework/documentation/classes/Front.html">http://plurious.com/framework/documentation/classes/Front.html</a></td>
</tr>
<tr>
<th>version</th>
<td>2.1</td>
</tr>
<tr>
<th>uses</th>
<td>\framework\engine\User</td>
</tr>
<tr>
<th>uses</th>
<td>\framework\engine\Config</td>
</tr>
<tr>
<th>uses</th>
<td>\framework\engine\Registry</td>
</tr>
<tr>
<th>uses</th>
<td>\framework\engine\Action</td>
</tr>
<tr>
<th>uses</th>
<td>\framework\engine\Document</td>
</tr>
<tr>
<th>uses</th>
<td>\framework\library\Url</td>
</tr>
<tr>
<th>uses</th>
<td>\framework\library\Request</td>
</tr>
</table>
<h3>
<i class="icon-custom icon-method"></i> Methods</h3>
<a name="__construct" id="__construct"></a><div class="element clickable method public __construct" data-toggle="collapse" data-target=".__construct .collapse">
<h2>Load up the config object for use here</h2>
<pre>__construct() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
</div>
<a name="buildRoutes" id="buildRoutes"></a><div class="element clickable method public buildRoutes" data-toggle="collapse" data-target=".buildRoutes .collapse">
<h2>Build and test routes to controller, model and template</h2>
<pre>buildRoutes(string $route) : mixed</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$route</h4>
<code>string</code><p>a route in the form [context/]controller[/method/arg/arg/...]</p>
</div>
<h3>Returns</h3>
<div class="subelement response">
<code>mixed</code>false if controller not found array of method parameters otherwise</div>
</div></div>
</div>
<a name="breadcrumbs" id="breadcrumbs"></a><div class="element clickable method protected breadcrumbs" data-toggle="collapse" data-target=".breadcrumbs .collapse">
<h2>Creates and manages a list of breadcrumbs</h2>
<pre>breadcrumbs() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><p class="long_description"><p>Uses session to store data if session is available, otherwise store
the breadcrumbs in a cookie.</p></p></div></div>
</div>
<a name="buildDirectories" id="buildDirectories"></a><div class="element clickable method private buildDirectories" data-toggle="collapse" data-target=".buildDirectories .collapse">
<h2>Decomposes provded route and sets file paths for controller, model and template
while a fully qualified namespaced class name, the method to call inside that
class and any parameters to pass to the method.</h2>
<pre>buildDirectories(string $route) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"><p>Sets:
config->context,
$this->controller,
$this->method,
$this->methodArgs,
$this->class,
$this->model,
$this->template</p></p>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$route</h4>
<code>string</code><p>a route in the form [context/]controller[/method/arg/arg/...]. The controller may stipulate a relative path</p>
</div>
</div></div>
</div>
<a name="clearRoutes" id="clearRoutes"></a><div class="element clickable method private clearRoutes" data-toggle="collapse" data-target=".clearRoutes .collapse">
<h2>Clears out the usefull data from the class.</h2>
<pre>clearRoutes() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><p class="long_description"><p>Clears:
Controller file path
Model file path
Template file path
Class namespace name
Method name
Template name</p></p></div></div>
</div>
<h3>
<i class="icon-custom icon-property"></i> Properties</h3>
<a name="%24class" id="$class"> </a><div class="element clickable property protected $class" data-toggle="collapse" data-target=".$class .collapse">
<h2>holds fully qualified namespaced class name</h2>
<pre>$class </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
</div>
<a name="%24context" id="$context"> </a><div class="element clickable property protected $context" data-toggle="collapse" data-target=".$context .collapse">
<h2>holds the app name as context</h2>
<pre>$context </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
</div>
<a name="%24controller" id="$controller"> </a><div class="element clickable property protected $controller" data-toggle="collapse" data-target=".$controller .collapse">
<h2>holds fully qualified file path to the controller name being processed</h2>
<pre>$controller </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
</div>
<a name="%24layout_name" id="$layout_name"> </a><div class="element clickable property protected $layout_name" data-toggle="collapse" data-target=".$layout_name .collapse">
<h2>holds the name of the view layout - this is the directory name for the view templates</h2>
<pre>$layout_name </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
</div>
<a name="%24method" id="$method"> </a><div class="element clickable property protected $method" data-toggle="collapse" data-target=".$method .collapse">
<h2>hold requested method if a method was requested</h2>
<pre>$method </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
</div>
<a name="%24methodArgs" id="$methodArgs"> </a><div class="element clickable property protected $methodArgs" data-toggle="collapse" data-target=".$methodArgs .collapse">
<h2>holds an array of method arguments pass along with route to method</h2>
<pre>$methodArgs </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
</div>
<a name="%24model" id="$model"> </a><div class="element clickable property protected $model" data-toggle="collapse" data-target=".$model .collapse">
<h2>holds the fully qualified file path to the model</h2>
<pre>$model </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
</div>
<a name="%24template" id="$template"> </a><div class="element clickable property protected $template" data-toggle="collapse" data-target=".$template .collapse">
<h2>holds  fully qualified file path to the associated template</h2>
<pre>$template </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
</div>
</div>
</div>
</div>
</div>
<div class="row"><footer class="span12">
            Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
            Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a7</a> and<br>
            generated on 2012-07-06T18:53:43-05:00.<br></footer></div>
</div>
</body>
</html>
